<app-nav-back>back</app-nav-back>
<mat-form-field>
  <input matInput (keyup)="applyFilter($event.target.value)" placeholder="filter">
</mat-form-field>
<mat-form-field>
  <mat-select placeholder="select filter" [(ngModel)]="selectedValue" (selectionChange)="applyFilter($event.value)">
    <mat-option value="高血脂">QQ Health</mat-option>
    <mat-option value="">None</mat-option>
  </mat-select>
</mat-form-field>
<table mat-table #table [dataSource]="dataSource" matSort class="mat-elevation-z8">
  <ng-container matColumnDef="selector">
    <th mat-header-cell *matHeaderCellDef>--</th>
    <td mat-cell *matCellDef="let row" (click)="$event.stopPropagation()">
      <mat-checkbox [(ngModel)]="row.selected"></mat-checkbox>
    </td>
  </ng-container>

  <ng-container matColumnDef="id">
    <th mat-header-cell *matHeaderCellDef mat-sort-header>id</th>
    <td mat-cell *matCellDef="let row">{{row.id}}</td>
  </ng-container>
  <!-- Progress Column -->
  <ng-container matColumnDef="title">
    <th mat-header-cell *matHeaderCellDef> title </th>
    <td mat-cell *matCellDef="let row"> {{row.title}} </td>
  </ng-container>

  <!-- Name Column -->
  <ng-container matColumnDef="spider">
    <th mat-header-cell *matHeaderCellDef> spider </th>
    <td mat-cell *matCellDef="let row"> {{row.spider}} </td>
  </ng-container>

  <ng-container matColumnDef="oper">
    <th mat-header-cell *matHeaderCellDef>--</th>
    <td mat-cell *matCellDef="let row" (click)="$event.stopPropagation()">
      <button mat-button (click)="onDelClicked($event)" *ngIf="row.title.indexOf('高血脂') !== -1">del?</button>
    </td>
  </ng-container>

  <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
  <tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="selectRow(row)"></tr>
</table>

<mat-paginator #paginator
              [length]="documents.length"
              [pageIndex]="0"
              [pageSize]="25"
              [pageSizeOptions]="[5, 10, 25, 100]">
</mat-paginator>
